if (CMAKE_HOST_WIN32)

	SET(SJJ1507_DIR ${THIRD_PARTY}/windows/x86/tasm)
	if(CMAKE_SIZEOF_VOID_P EQUAL 8)
		SET(SJJ1507_DIR ${THIRD_PARTY}/windows/x64/tasm)
	endif()

	SET(SJJ1507_INCLUDE_DIR ${SJJ1507_DIR}/include)
	SET(SJJ1507_LIB_DIR  ${SJJ1507_DIR}/lib)
	SET(SJJ1507_LIBS libcrypto libssl)
ELSE()

	IF(CMAKE_TOOLCHAIN_FILE)
		IF (CMAKE_SYSTEM_NAME STREQUAL Android)

			IF (ANDROID_ABI STREQUAL armeabi-v7a)
				SET(SJJ1507_DIR ${THIRD_PARTY}/android/tasm/armeabi-v7a)
			ELSEIF (ANDROID_ABI STREQUAL arm64-v8a)
				SET(SJJ1507_DIR ${THIRD_PARTY}/android/tasm/arm64-v8a)
			ENDIF()

			SET(SJJ1507_INCLUDE_DIR ${SJJ1507_DIR}/include)
			SET(SJJ1507_LIB_DIR ${SJJ1507_DIR}/lib)

		ELSEIF (CMAKE_C_COMPILER MATCHES "hisiv300")
			SET(SJJ1507_DIR ${THIRD_PARTY}/hisiv300/tasm)
			SET(SJJ1507_INCLUDE_DIR ${SJJ1507_DIR}/include)
			SET(SJJ1507_LIB_DIR ${SJJ1507_DIR}/lib)
		ENDIF()

		IF (CMAKE_C_COMPILER MATCHES "hisiv400")
			SET(SJJ1507_DIR ${THIRD_PARTY}/hisiv400/tasm)
			SET(SJJ1507_INCLUDE_DIR ${SJJ1507_DIR}/include)
			SET(SJJ1507_LIB_DIR ${SJJ1507_DIR}/lib)
		ENDIF()

		IF (CMAKE_C_COMPILER MATCHES "hisiv500")
			SET(SJJ1507_DIR ${THIRD_PARTY}/hisiv500/tasm)
			SET(SJJ1507_INCLUDE_DIR ${SJJ1507_DIR}/include)
			SET(SJJ1507_LIB_DIR ${SJJ1507_DIR}/lib)
		ENDIF()

		IF (CMAKE_C_COMPILER MATCHES "hisiv600")
			SET(SJJ1507_DIR ${THIRD_PARTY}/hisiv600/tasm)
			SET(SJJ1507_INCLUDE_DIR ${SJJ1507_DIR}/include)
			SET(SJJ1507_LIB_DIR ${SJJ1507_DIR}/lib)
		ENDIF()

		IF (CMAKE_C_COMPILER MATCHES "himix100")
			SET(SJJ1507_DIR ${THIRD_PARTY}/himix100/tasm)
			SET(SJJ1507_INCLUDE_DIR ${SJJ1507_DIR}/include)
			SET(SJJ1507_LIB_DIR ${SJJ1507_DIR}/lib)
		ENDIF()

		IF (CMAKE_C_COMPILER MATCHES "himix200")
			SET(SJJ1507_DIR ${THIRD_PARTY}/himix200/tasm)
			SET(SJJ1507_INCLUDE_DIR ${SJJ1507_DIR}/include)
			SET(SJJ1507_LIB_DIR ${SJJ1507_DIR}/lib)
		ENDIF()

	ELSE()
		FIND_PATH(SJJ1507_INCLUDE_DIR NAMES TA_HSM_SJJ1507.h PATHS ${THIRD_PARTY}/gcc/tasm/include)
		FIND_PATH(SJJ1507_LIB_DIR NAMES libTassSDF.so PATHS ${THIRD_PARTY}/gcc/tasm/lib)
	ENDIF()	
	SET(SJJ1507_LIBS ${SJJ1507_LIB_DIR}/libTassSDF.so  ${SJJ1507_LIB_DIR}/libTA_HSM_SJJ1507.a)
ENDIF()
